<?php

namespace app\admin\validate\facrm;

use think\Validate;

class Invoice extends Validate
{

    /**
     * 验证规则
     */
    protected $rule = [
        'money'      => 'require|gt:0',
        'invoice_name'=> 'require',

    ];

    /**
     * 提示消息
     */
    protected $message = [
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => [
            'invoice_name',

        ],
        'edit' => [
            'invoice_name',
        ],
    ];

    public function __construct(array $rules = array(), $message = array(), $field = array())
    {

        $this->field =[
            'invoice_name'=>__("发票抬头"),
            'money'      =>__("开票金额"),
        ];
        parent::__construct($rules, $message, $field);
    }
}
